expandAll Method |
This method expands the root node or the selected node of the tree to all levels recursively.
Syntax
treeID.root.expandAll()
When called from a node other than root, the syntax is as follows:
treeNode.expandAll()
Return Value
No return value.
Remarks
The operation should be performed only on a parent tree node item (item with a "+" symbol before it indicating that it can be expanded).
When this function is called, the node is expanded to all the levels recursively, and any function associated with theonexpandproperty of the tree item is fired for each item. Once expanded, all the expanded items will have a "-" symbol in place of "+" indicating that they are already expanded.
The expandAll method can be called on the root, only if there is a root in the tree defined by the root node.
Example
The following example shows how the above method is used.
//Function called on onload event of the window function initialize() { //Expand all nodes if (sampletree.root.expandAll) sampletree.root.expandAll(); }